]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
browser-plugin: Fix enable/disable
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 28 May 2012 23:26:02 +0000 (19:26 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Tue, 29 May 2012 18:36:16 +0000 (14:36 -0400)
This code was broken at the last minute, and an accidentally stale plugin
copy kept it untested.

https://bugzilla.gnome.org/show_bug.cgi?id=676837

browser-plugin/browser-plugin.c

index 2676beb22dc635fd0645abcceaec677278cb8cc2..01f335a04d04bac1bcc1fc250bf6fa84eec37cc4 100644 (file)
@@ -515,9 +515,9 @@ plugin_enable_extension (PluginObject *obj,
   if (enabled)
     {
       new_uuids = g_new (const gchar *, length + 2); /* New key, NULL */
-      memcpy (new_uuids, uuids, length);
-      new_uuids[length - 2] = uuid_str;
-      new_uuids[length - 1] = NULL;
+      memcpy (new_uuids, uuids, length * sizeof (*new_uuids));
+      new_uuids[length] = uuid_str;
+      new_uuids[length + 1] = NULL;
     }
   else
     {